<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>absolute | 我的课程记录笔记</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-sectionx/sectionx.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../md/css/relative.html" />
    
    
    <link rel="prev" href="../../md/css/定位.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="4.11.1"
        data-chapter-title="absolute"
        data-filepath="md/css/absolute.md"
        data-basepath="../.."
        data-revision="Tue Dec 19 2017 11:33:16 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="md/gitbook.html">
            
                
                    <a href="../../md/gitbook.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        gitbook的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2" data-path="md/git.html">
            
                
                    <a href="../../md/git.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        git的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3" data-path="md/html/html.html">
            
                
                    <a href="../../md/html/html.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        html
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="md/html/a标签锚点.html">
            
                
                    <a href="../../md/html/a标签锚点.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        a标签锚点
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="md/html/ul.html">
            
                
                    <a href="../../md/html/ul.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        ul标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="md/html/ol.html">
            
                
                    <a href="../../md/html/ol.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        ol标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="md/html/dl自定义列表.html">
            
                
                    <a href="../../md/html/dl自定义列表.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        dl自定义列表
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="md/html/内嵌页面.html">
            
                
                    <a href="../../md/html/内嵌页面.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        内嵌页面标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="md/html/网页icon.html">
            
                
                    <a href="../../md/html/网页icon.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.6.</b>
                        
                        网页icon
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="md/html/微博组件使用.html">
            
                
                    <a href="../../md/html/微博组件使用.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.7.</b>
                        
                        微博组件使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="md/html/统一化路径base.html">
            
                
                    <a href="../../md/html/统一化路径base.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.</b>
                        
                        统一化路径bace
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.9" data-path="md/html/表格.html">
            
                
                    <a href="../../md/html/表格.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.9.</b>
                        
                        表格
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.10" data-path="md/html/热区.html">
            
                
                    <a href="../../md/html/热区.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.10.</b>
                        
                        热区
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.11" data-path="md/html/audio.html">
            
                
                    <a href="../../md/html/audio.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.11.</b>
                        
                        音频
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.12" data-path="md/html/picture.html">
            
                
                    <a href="../../md/html/picture.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.12.</b>
                        
                        picture
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.13" data-path="md/html/video.html">
            
                
                    <a href="../../md/html/video.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.13.</b>
                        
                        视频
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.14" data-path="md/html/form.html">
            
                
                    <a href="../../md/html/form.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.14.</b>
                        
                        form表单
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.14.1" data-path="md/html/input.html">
            
                
                    <a href="../../md/html/input.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.14.1.</b>
                        
                        input应用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.14.2" data-path="md/html/form1.html">
            
                
                    <a href="../../md/html/form1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.14.2.</b>
                        
                        扩展的表单功能
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="md/css/css.html">
            
                
                    <a href="../../md/css/css.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        CSS
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="md/css/CSS的引入方式.html">
            
                
                    <a href="../../md/css/CSS的引入方式.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        css的引入方式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="md/css/元素选择器.html">
            
                
                    <a href="../../md/css/元素选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        元素选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="md/css/class和id选择器.html">
            
                
                    <a href="../../md/css/class和id选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        class和id选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="md/css/关系选择器.html">
            
                
                    <a href="../../md/css/关系选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.</b>
                        
                        关系选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="md/css/伪类选择器.html">
            
                
                    <a href="../../md/css/伪类选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.</b>
                        
                        伪类选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.6" data-path="md/css/属性选择器.html">
            
                
                    <a href="../../md/css/属性选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.6.</b>
                        
                        属性选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.7" data-path="md/css/伪对象选择器.html">
            
                
                    <a href="../../md/css/伪对象选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.7.</b>
                        
                        伪对象选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.8" data-path="md/字体样式.html">
            
                
                    <a href="../../md/字体样式.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.8.</b>
                        
                        字体样式
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.8.1" data-path="md/css/font.html">
            
                
                    <a href="../../md/css/font.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.8.1.</b>
                        
                        Font
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.8.2" data-path="md/css/color.html">
            
                
                    <a href="../../md/css/color.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.8.2.</b>
                        
                        color
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.8.3" data-path="md/css/text-decoration.html">
            
                
                    <a href="../../md/css/text-decoration.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.8.3.</b>
                        
                        text-decoration
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.8.4" data-path="md/css/text-shadow.html">
            
                
                    <a href="../../md/css/text-shadow.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.8.4.</b>
                        
                        text-shadow
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.9" data-path="md/元素样式.html">
            
                
                    <a href="../../md/元素样式.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.</b>
                        
                        元素样式
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.9.1" data-path="md/css/盒子模型.html">
            
                
                    <a href="../../md/css/盒子模型.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.1.</b>
                        
                        盒子模型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.9.2" data-path="md/css/margin.html">
            
                
                    <a href="../../md/css/margin.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.2.</b>
                        
                        margin
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.9.3" data-path="md/css/padding.html">
            
                
                    <a href="../../md/css/padding.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.3.</b>
                        
                        padding
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.9.4" data-path="md/css/块级元素和行内元素.html">
            
                
                    <a href="../../md/css/块级元素和行内元素.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.4.</b>
                        
                        块级元素和行内元素
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.9.5" data-path="md/css/行内块元素的对齐.html">
            
                
                    <a href="../../md/css/行内块元素的对齐.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.5.</b>
                        
                        行内块元素的对齐
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.10" data-path="md/布局.html">
            
                
                    <a href="../../md/布局.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.10.</b>
                        
                        布局
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.10.1" data-path="md/css/文档流.html">
            
                
                    <a href="../../md/css/文档流.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.10.1.</b>
                        
                        文档流
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.10.2" data-path="md/css/float.html">
            
                
                    <a href="../../md/css/float.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.10.2.</b>
                        
                        float浮动
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.10.3" data-path="md/css/图片的处理.html">
            
                
                    <a href="../../md/css/图片的处理.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.10.3.</b>
                        
                        图片的处理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.10.4" data-path="md/css/文字的处理.html">
            
                
                    <a href="../../md/css/文字的处理.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.10.4.</b>
                        
                        文字的处理
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.11" data-path="md/css/定位.html">
            
                
                    <a href="../../md/css/定位.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.11.</b>
                        
                        定位
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="4.11.1" data-path="md/css/absolute.html">
            
                
                    <a href="../../md/css/absolute.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.11.1.</b>
                        
                        absolute
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.11.2" data-path="md/css/relative.html">
            
                
                    <a href="../../md/css/relative.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.11.2.</b>
                        
                        relative
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.11.3" data-path="md/css/fixed.html">
            
                
                    <a href="../../md/css/fixed.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.11.3.</b>
                        
                        fixed
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >我的课程记录笔记</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h2 id="absolute">absolute</h2>
<p><strong>&#x7EDD;&#x5BF9;&#x5B9A;&#x4F4D;</strong> :&#x628A;&#x5143;&#x7D20;&#x8131;&#x79BB;&#x6587;&#x6863;&#x6D41;&#xFF0C;&#x901A;&#x8FC7;left,right,bottom,top&#x8FDB;&#x884C;&#x5B9A;&#x4F4D;&#xFF0C;&#x53C2;&#x8003;&#x70B9;&#x662F;body&#x7684;&#x6700;&#x5DE6;&#x4E0A;&#x89D2;&#x3002;   </p>
<ol>
<li>&#x8131;&#x79BB;&#x6587;&#x6863;&#x6D41;&#xFF0C;&#x6240;&#x4EE5;&#x4E0D;&#x518D;&#x5360;&#x6709;&#x6B63;&#x5E38;&#x6587;&#x6863;&#x6D41;&#x7684;&#x4F4D;&#x7F6E;   </li>
<li>&#x975E;&#x5E38;&#x7684;&#x81EA;&#x7531;&#xFF0C;&#x53EF;&#x4EE5;&#x968F;&#x610F;&#x65B9;&#x4FBF;&#x7684;&#x8BBE;&#x7F6E;&#x4F4D;&#x7F6E;&#x4FE1;&#x606F;&#xFF0C;&#x901A;&#x5E38;&#x9009;&#x62E9;&#x56DB;&#x4E2A;&#x65B9;&#x5411;&#x7684;2&#x4E2A;&#x5C31;&#x53EF;&#x4EE5;&#x4E86;&#x3002;   </li>
<li>&#x4E0D;&#x5BB9;&#x6613;&#x53D7;&#x63A7;&#xFF0C;&#x4E0D;&#x53D7;&#x5143;&#x7D20;&#x7ED3;&#x6784;&#x7684;&#x5F71;&#x54CD;&#xFF0C;&#x4E5F;&#x4E0D;&#x53D7;&#x51FA;&#x751F;&#x4F4D;&#x7F6E;&#x7684;&#x5F71;&#x54CD;&#xFF0C;&#x5982;&#x679C;&#x7236;&#x5143;&#x7D20;&#x4E0D;&#x662F;&#x5E26;&#x6709;&#x5B9A;&#x4F4D;&#x4FE1;&#x606F;&#xFF0C;&#x5219;&#x6839;&#x636E;body&#x7684;&#x5DE6;&#x4E0A;&#x89D2;&#x4F5C;&#x4E3A;&#x53C2;&#x8003;&#x70B9;&#x3002;&#x5426;&#x5219;&#xFF0C;&#x5219;&#x4EE5;&#x7236;&#x5143;&#x7D20;&#x7684;&#x5DE6;&#x4E0A;&#x89D2;&#x4F5C;&#x4E3A;&#x53C2;&#x8003;&#x70B9;&#x3002;&#xFF08;&#x5E26;&#x6709;&#x5B9A;&#x4F4D;&#x4FE1;&#x606F;&#x7684;&#x5143;&#x7D20;&#xFF0C;&#x662F;&#x6307;&#x8BBE;&#x7F6E;&#x4E86;&#x7EDD;&#x5BF9;&#x5B9A;&#x4F4D;&#x3001;&#x76F8;&#x5BF9;&#x5B9A;&#x4F4D;&#x3001;&#x56FA;&#x5B9A;&#x5B9A;&#x4F4D;&#x7684;&#x5143;&#x7D20;,&#x4F46;&#x6211;&#x4EEC;&#x66F4;&#x63A8;&#x8350;&#x4F7F;&#x7528;&#x76F8;&#x5BF9;&#x5B9A;&#x4F4D;&#x6765;&#x7BA1;&#x7406;&#x7EDD;&#x5BF9;&#x5B9A;&#x4F4D;&#x7684;&#x5143;&#x7D20;&#xFF09;   </li>
</ol>
<pre><code>&lt;style&gt;
     .test{
        width: 100px;
        height: 100px;
        background: skyblue;
        position:absolute;/*&#x8BBE;&#x7F6E;&#x5B9A;&#x4F4D;&#x4FE1;&#x606F;&#x4E3A;&#x7EDD;&#x5BF9;&#x5B9A;&#x4F4D;*/
        left:100px;/*&#x8DDD;&#x79BB;&#x5DE6;&#x8FB9;100px*/
        /*right:0;*/
        top:100px;/*&#x8DDD;&#x79BB;&#x9876;&#x90E8;100px*/
        /*bottom:0;*/
    }
    .test2{
        width: 100px;
        height: 100px;
        background: pink;
    }
    .baba{
        width: 200px;
        height: 200px;
        background: black;
        position: absolute;
        left:300px;
    }
&lt;/style&gt;

&lt;div class=&quot;test2&quot;&gt;
    &#x6211;&#x662F;&#x4E00;&#x53EA;&#x67D4;&#x5F31;&#x7684;&#x5C0F;&#x80A5;&#x7F8A;
&lt;/div&gt;

&lt;div class=&quot;baba&quot;&gt;
    &lt;div class=&quot;test&quot;&gt;
        &#x6211;&#x662F;&#x4E00;&#x5339;&#x5FEB;&#x4E50;&#x7684;&#x5C0F;&#x7070;&#x72FC;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>
                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../md/css/定位.html" class="navigation navigation-prev " aria-label="Previous page: 定位"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../md/css/relative.html" class="navigation navigation-next " aria-label="Next page: relative"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sectionx/sectionx.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"sectionx":{},"expandable-chapters":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
